package cn.itcast.poi.entity;

import cn.itcast.poi.annotation.ExcelAttribute;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author User
 */
@Getter
@Setter
@NoArgsConstructor
@ToString
@Entity
@Table(name = "tb_user")
public class User implements Serializable {

    private static final long serialVersionUID = -7856821473280759493L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;

    /**
     * 序号
     */
    @ExcelAttribute(sort = 0)
    private String sortNo;

    @ExcelAttribute(sort = 1)
    private String username;

    @ExcelAttribute(sort = 2)
    private Integer age;

    @ExcelAttribute(sort = 3)
    private String address;

    @ExcelAttribute(sort = 4)
    private String school;

    @ExcelAttribute(sort = 5)
    private String national;

    /**
     * 导入数据时,哪行数据校验失败不能导入时的原因
     */
    @ExcelAttribute(sort = 6)
    private String remark;
}
